﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace SAM.Framework.Repository.Connection
{
    /// <summary>
    /// 
    /// </summary>
    public interface IActiveTransactionProvider
    {
        /// <summary>
        /// get the active transaction or null if current UOW is not transcational.
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        IDbTransaction GetActiveTransaction(ActiveTransactionProviderArgs args);

        /// <summary>
        /// get the active database connection
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        IDbConnection GetActiveConnection(ActiveTransactionProviderArgs args);
    }
}
